﻿var WIDGETS = WIDGETS || {};

WIDGETS.menu = function ($element, options) {

    var proto = {
        $element: $($element),
        options: options,

        init: function () {
            this.discoverChildren();
            this.bindEvents();
            this.storeSelf();
        },

        discoverChildren: function () {
        },

        bindEvents: function () {
        },

        storeSelf: function () {
            this.$element.data("menu", this);
        },

        getId: function () {
            return this.$element.attr('id');
        }
    }

    proto.init();

    return proto;
}
